/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.kamionowski.supreme.admin.controller;

import javax.inject.Inject;
import org.kamionowski.supreme.services.global.HostService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

/**
 *
 * @author soldier
 */
@Controller
public class HostController {
    
    @Inject
    private HostService hostService;
    
    @RequestMapping("/hosts.html")
    public ModelAndView hostsList(){
        ModelAndView mv = new ModelAndView("hostsPage");
        mv.addObject("hosts", hostService.getHosts());
        return mv;
    }
    
}
